/**
 * Function is loading file responsible for doing specific tests, depending on user selection.
 **/
function loadFile(){
	electionID = $('#selectElections').val();
	
	showLoader('#step1');
	$('#cont').load('inc/' +  ELECTIONS[electionID].file);
}

/**
 * Function that runs after page is loaded.
 **/
$(function(){
	//get election configuration and fill select field
	tmpHTML = '';
	for(i = 0; ELECTIONS[i]; i++){
		tmpHTML += '<option value="' + i + '">' + ELECTIONS[i].name + '</option>';
	}
	$('#selectElections').html(tmpHTML);
	
	$('#btn_step1').click(loadFile);
});
